package
{
	import flash.display.GradientType;
	import flash.display.SpreadMethod;
	import flash.display.Sprite;
	import flash.geom.Matrix;

	public class MouseEnabledChart extends Sprite //617x200
	{
		private const W:int = 6;
		
		private var data:Array = [];
		
		public function MouseEnabledChart()
		{
			for(var i:int = 0; i < 88; i++)
			{
				data[i] = int(Math.random()*90)*10 + 100;
			}
			
			renderData();
		}
		
		private function renderData():void
		{
			var bar:Bar;
			for(var i:int=0; i<88; i++)
			{
				bar = new Bar(data[i]/10);
				bar.x = i*7;
				addChild(bar);
			}
		}
	}
}
	import flash.display.GradientType;
	import flash.display.SpreadMethod;
	import flash.display.Sprite;
	import flash.geom.Matrix;

class Bar extends Sprite
{
	public function Bar(h:int)
	{
		var matr:Matrix = new Matrix();
		matr.createGradientBox(6, h, Math.PI/2, 0, 200-h);
		
		graphics.beginGradientFill(GradientType.LINEAR, [0x1F8DF5, 0x232124], [1, 1], [0x00, 0xFF], matr, SpreadMethod.PAD);
		graphics.drawRect(0, 200-h, 6, h);
	}
}